var isWx=true;
wx.miniProgram.getEnv(function(res) {
    if(res.miniprogram){
        //小程序
        isWx=true;
    }else{
        isWx=false;
    }
});
//佣金明细
function goDetailPage(memberId){
    window.location.href="/weChat/detail?memberId="+memberId;
}
//首页
function goFistPage(memberId,cityId){
    window.location.href="/weChat/index?memberId="+memberId+"&cityId="+cityId;
}
//客户
function goKhPage(memberId,reportState){
    if(reportState==null||reportState==""){
        reportState='1';
    }
    window.location.href="/weChat/kh?memberId="+memberId+"&reportState="+reportState;
}
//积分兑换
function goJFDHPage(memberId){
    window.location.href="/weChat/jfsc?memberId="+memberId;
}
//我的订单
function goMyDetailPage(memberId){
    window.location.href="/weChat/myDetail?memberId="+memberId;
}
//我的积分
function goMyScorePage(memberId){
    window.location.href="/weChat/myScore?memberId="+memberId;
}
//我的搜索
function goSearchPage(memberId,cityId){
    window.location.href="/weChat/search?memberId="+memberId+"&cityId="+cityId;
}
//入驻申请
function goSettledPage(memberId,itemId){
    window.location.href="/weChat/settled?memberId="+memberId+"&itemId="+itemId;
}
//积分兑换
function goAdvisePage(memberId){
    window.location.href="/weChat/advise?memberId="+memberId;
}
//申请经纪人
function goSQJJRPage(memberId){
    window.location.href="/weChat/sqjjr?memberId="+memberId;
}
//申请经纪人
function goSQJJRPage(memberId){
    window.location.href="/weChat/sqjjr?memberId="+memberId;
}
//个人中心
function goMyPage(memberId){
    window.location.href="/weChat/my?memberId="+memberId;
}
//我要报备
function goWybbPage(memberId,cityId,itemId){
    window.location.href="/weChat/bbkh?memberId="+memberId+"&cityId="+cityId+"&itemId="+itemId;
}
//房屋详情
function goFwPage(memberId,cityId){
    window.location.href="/weChat/fwxx?memberId="+memberId+"&cityId="+cityId;
}
//小区详情
function goXqPage(memberId,id){
    window.location.href="/weChat/xq?memberId="+memberId+"&id="+id;
}
//分享详情
function goSharePage(memberId){
    window.location.href="/weChat/share?memberId="+memberId;
}
//文章详情
function goArticlePage(memberId,id){
    window.location.href="/weChat/article?memberId="+memberId+"&id="+id;
}

//文章详情
function goarticleUrlPage(memberId,id,url){
    window.location.href="/weChat/articleUrl?memberId="+memberId+"&id="+id+"&url="+url;
}
//商品详情
function goProductDescPage(memberId,id){
    window.location.href="/weChat/productDesc?memberId="+memberId+"&id="+id;
}
//我的推广人员
function goMyMemberPage(memberId){
    window.location.href="/weChat/myMember?memberId="+memberId;
}
//我的信息
function goWdmpPage(memberId){
    window.location.href="/weChat/wdmp?memberId="+memberId;
}
//提现
function goTixianPage(memberId){
    window.location.href="/weChat/tixian?memberId="+memberId;
}
//提现明细
function goTixianListPage(memberId){
    window.location.href="/weChat/tixianList?memberId="+memberId;
}

function goShopPage(memberId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/shop&urlParam=memberId*'+memberId})
    }else{
        window.location.href="/phone/shop?memberId="+memberId;
    }
}
// shop详情
function goItemDetail(memberId, id){
    window.location.href="/phone/shopItemDetail?memberId="+memberId+"&id="+id;
}

//付款码
function goPaymentCodePage(memberId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/paymentCode&urlParam=memberId*'+memberId})
    }else{
        window.location.href="/phone/paymentCode?memberId="+memberId;
    }
}
//回收大分类
function goRecoveryLargeCatPage(memberId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/recoveryLargeCat&urlParam=memberId*'+memberId})
    }else{
        window.location.href="/phone/recoveryLargeCat?memberId="+memberId;
    }
}
//回收中分类
function goRecoveryMiddleCatPage(memberId,largeCatId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/recoveryMiddleCat&urlParam=memberId*'+memberId+'#largeCatId*'+largeCatId})
    }else{
        window.location.href="/phone/recoveryMiddleCat?memberId="+memberId+"&largeCatId="+largeCatId;
    }
}
//消费记录
function goRecoveryRecordPage(memberId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/recoveryRecord&urlParam=memberId*'+memberId})
    }else{
        window.location.href="/phone/recoveryRecord?memberId="+memberId;
    }
}
//了解环保金-文章列表
function goWebArticleListPage(memberId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/webArticleList&urlParam=memberId*'+memberId})
    }else{
        window.location.href="/phone/webArticleList?memberId="+memberId;
    }
}
//文章详情
function getWebArticleDetailPage(memberId,id) {
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/webArticleDetail&urlParam=memberId*'+memberId+'#id*'+id})
    }else{
        window.location.href="/phone/webArticleDetail?memberId="+memberId+"&id="+id;
    }
}
//客服
function goCallCenterPage(memberId,status){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/callCenter&urlParam=memberId*'+memberId+'#status*'+status})
    }else{
        window.location.href="/phone/callCenter?memberId="+memberId+"&status="+status;
    }
}
//我的环保金
function goMyGoldRecoveryPage(memberId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/myGoldRecovery&urlParam=memberId*'+memberId})
    }else{
        window.location.href="/phone/myGoldRecovery?memberId="+memberId;
    }
}
//扫码提交页面
function goDebitNotePage(memberId,useMemberId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/debitNote&urlParam=memberId*'+memberId+'#useMemberId*'+useMemberId})
    }else{
        window.location.href="/phone/debitNote?memberId="+memberId+"&useMemberId="+useMemberId;
    }
}

// 商城用户地址列表
function goShopAddressListPage(memberId,status){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/shopAddressList&urlParam=memberId*'+memberId+'#status*'+status})
    }else{
        window.location.href="/phone/shopAddressList?memberId="+memberId+"&status="+status;
    }
}
// 商城编辑后跳转用户地址列表
function goShopAddressListPageLase(memberId,status){
    if(isWx){
        wx.miniProgram.redirectTo({url: '/pages/index/index?url=/phone/shopAddressList&urlParam=memberId*'+memberId+'#status*'+status})
    }else{
        window.location.href="/phone/shopAddressList?memberId="+memberId+"&status="+status;
    }
}
// 商城用户地址编辑
function goShopAddressAddPage(memberId,status){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/shopAddressEdit&urlParam=memberId*'+memberId+'#status*'+status})
    }else{
        window.location.href="/phone/shopAddressEdit?memberId="+memberId+"&status="+status;
    }
}
function goShopAddressEditPage(memberId,addressId,status){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/shopAddressEdit&urlParam=memberId*'+memberId+'#addressId*'+addressId+'#status*'+status})
    }else{
        window.location.href="/phone/shopAddressEdit?memberId="+memberId+"&addressId="+addressId+"&status="+status;
    }
}

// 呼叫页面
function goCallOutPage(memberId,largeCatId){
    if(isWx){
        wx.miniProgram.navigateTo({url: '/pages/index/index?url=/phone/callOut&urlParam=memberId*'+memberId+'#largeCatId*'+largeCatId})
    }else{
        window.location.href="/phone/callOut?memberId="+memberId+"&largeCatId="+largeCatId;
    }
}